home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / gnu / smaltalk.lha / smalltalk-1.1.1 / stix / Makefile < prev    next >
Makefile  |  1991-09-12  |  5KB  |  180 lines

  1. ######################################################################
  2. #
  3. # Copyright (C) 1988, 1989, 1990 Free Software Foundation, Inc.
  4. # Written by Steve Byrne, with lots of good input from Dave Ciemiewicz.
  5. #
  6. # This file is part of GNU Smalltalk.
  7. #
  8. # GNU Smalltalk is free software; you can redistribute it and/or modify it
  9. # under the terms of the GNU General Public License as published by the Free
  10. # Software Foundation; either version 1, or (at your option) any later version.
  11. # GNU Smalltalk is distributed in the hope that it will be useful, but WITHOUT
  12. # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  13. # FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
  14. # details.
  15. # You should have received a copy of the GNU General Public License along with
  16. # GNU Smalltalk; see the file COPYING.  If not, write to the Free Software
  17. # Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  
  18. #
  19. #######################################################################
  20.  
  21. ##################
  22. ##################
  23. ##################
  24. ###
  25. ### See mst.texinfo for details on installation.
  26. ###
  27. ##################
  28. ##################
  29. ##################
  30.  
  31. ##############
  32. #
  33. # These variables you may wish to change
  34. #
  35. ##############
  36.  
  37. # Mail path to GNU Smalltalk maintainer (Steve Byrne)
  38. MAINTAINER = 'sbb@eng.sun.com'
  39.  
  40. # Uncomment this to use the winning GNU C compiler
  41. #CC = gcc
  42.  
  43. # These two definitions are used to allow you to add your own files
  44. # and libraries that will be linked into the GNU Smalltalk executable image.
  45. # see ./examples/Makefile for an example of how to use these
  46. USER_OBJS = socket.o
  47. USER_LIBS =
  48.  
  49. # This controls what file gets created on a 'make tar'...it could be the name
  50. # of a tape drive.
  51. TAR_FILE = mst.tar    # change this or override to be correct for your site
  52.  
  53. # Note: an alternative is  CPP = /lib/cpp
  54. CPP = cc -E
  55.  
  56. # Uncomment this line to enable the ultra-winning readline-reader
  57. #READLINE = -DUSE_READLINE
  58.  
  59. ######################################################################
  60. ######################################################################
  61. ######################################################################
  62. ###
  63. ### You typically won't want to change any variables below this 
  64. ### point, although you may want to add rules for your own C functions
  65. ### below.
  66. ###
  67. ######################################################################
  68. ######################################################################
  69. ######################################################################
  70.  
  71. MAKE = make  # BSD doesn't have it as a default.
  72.  
  73. # This controls the distribution version (not completely yet)
  74. VERSION=1.1.1
  75.  
  76. all: xmakefile $(USER_OBJS)
  77.     @$(MAKE) $(MFLAGS) \
  78.         CC=$(CC) \
  79.         "USER_OBJS=$(USER_OBJS)" "USER_LIBS=$(USER_LIBS)" \
  80.         -f xmakefile mst
  81.  
  82. mst lexdebug: xmakefile $(USER_OBJS)
  83.     @$(MAKE) $(MFLAGS) CC=$(CC) \
  84.         "USER_OBJS=$(USER_OBJS)" "USER_LIBS=$(USER_LIBS)" \
  85.         -f xmakefile $@
  86.  
  87. # Edit this to reflect the path on your system where the X include files
  88. # may be found.
  89. XINCLUDE = /usr/include/X11
  90.  
  91. socket.o: socket.c
  92.     $(CC) -I$(XINCLUDE) $(CFLAGS) -DUNIXCONN -c socket.c
  93.  
  94.  
  95. unfin:
  96.     egrep -n '### ' *.[chy]
  97.  
  98. optionals:
  99.     egrep -n '??? ' *.[chy]
  100.  
  101. profile:
  102.     $(MAKE) CFLAGS='$(CFLAGS) -pg -Dprofiling' -f xmakefile $@
  103.  
  104. regress:
  105.     (cd ./test; run-regression-tests)
  106.  
  107. clean:
  108.     -rm -f *.o
  109.     -rm -f mst mst.im
  110.     -rm -f junk.c xmakefile
  111.  
  112. #
  113. # Install into the directories pointed to by mstpaths.h
  114. #
  115.  
  116. install: xmakefile
  117.     @$(MAKE) $(MFLAGS) -f xmakefile install
  118.  
  119. #
  120. # Create a tar file based on the Smalltalk source files
  121. #
  122. tar:
  123.     rm -f smalltalk-$(VERSION)
  124.     ln -s . smalltalk-$(VERSION)
  125.     sed -e "s/^/smalltalk-$(VERSION)\//" < mstfiles > mstdistfiles
  126.     tar cvf $(TAR_FILE) `cat mstdistfiles`
  127.     rm -f mstdistfiles
  128.  
  129. xmakefile: ymakefile mstconfig.h mstpaths.h
  130.     @echo "===== creating configuration dependent xmakefile"
  131.     rm -f xmakefile
  132.     cp ymakefile junk.c
  133.     $(CPP) -DFOR_MAKE $(READLINE) junk.c |                \
  134.     sed -e 's/^#.*//' -e 's/^[ \f\t][ \f\t]*$$//' -e 's/^ / /' |    \
  135.     sed -n -e '/^..*$$/p' > xmakefile
  136.     rm -f junk.c
  137.     @echo "===== done creating xmakefile"
  138.  
  139.  
  140.  
  141. #
  142. # Make the shar file for GNU Smalltalk
  143. #
  144. shar:
  145.     shar -imstfiles > mst.shar
  146.  
  147.  
  148. #
  149. # (Re)build the tags for Emacs
  150. #
  151. tags:
  152.     etags mst*.[ch]
  153.  
  154. senddiffs: diffs
  155.     kermit -e 1000 -s mst.diffs
  156.  
  157. mail-diffs:
  158.     @echo "Please enter a brief note describing the contents of"
  159.     @echo "the diffs file that you've created.  End with Ctrl-D."
  160.     @cat > mst.diffs.note
  161.     @echo "-----------------------------------" >> mst.diffs.note
  162.     @### If there's a more portable/better way to do this, please
  163.     @### don't hesitate to fix this and send the new version back -- SBB
  164.     @cat mst.diffs.note mst.diffs | mail $(MAINTAINER)
  165.  
  166. diffs:
  167.     mk_mst_diffs
  168.  
  169. setup:
  170.     @if [ -f ./orig ] ; then \
  171.         echo "./orig exists, but is not a directory" ; \
  172.         exit 1 ; \
  173.     fi
  174.     rm -rf ./orig
  175.     mkdir ./orig
  176.     tar cbf 20 - `cat mstfiles` | (cd ./orig; tar xbBf 20 -)
  177.  
  178.